import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
} from '@nestjs/common';
import { ToyManualService } from './toy-manual.service';
import { CreateToyManualDto } from './dto/create-toy-manual.dto';
import { UpdateToyManualDto } from './dto/update-toy-manual.dto';

@Controller('toyManual')
export class ToyManualController {
  constructor(private readonly toyManualService: ToyManualService) {}

  @Post()
  create(@Body() createToyManualDto: CreateToyManualDto) {
    return this.toyManualService.create(createToyManualDto);
  }

  @Get()
  findAll() {
    return this.toyManualService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.toyManualService.findOne(+id);
  }

  @Patch(':id')
  update(
    @Param('id') id: string,
    @Body() updateToyManualDto: UpdateToyManualDto,
  ) {
    return this.toyManualService.update(+id, updateToyManualDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.toyManualService.remove(+id);
  }
}
